const sw = document.querySelector(".Foo_banner").offsetWidth;
const si = document.querySelector("#imgbox");
const imgs = document.querySelectorAll("#imgbox img");

onload = function(){
  const w = imgs[0].offsetWidth;
  const last = w - sw % w;
  const maxi = -imgs.length + Math.floor(sw / w);
  console.log(w)
  console.log(sw)
  // const maxi = -7;

  let i = 0;
  const t = setInterval(() => {
    i--;
    if(i === maxi){
      si.style.left = (i+1)*w - last + "px";
      i = 0;
      return
    }
    si.style.left = i*w + "px";
  }, 1000);
}
